<template>
  <h2>这是项目标题</h2>
  <p>count: {{ count }}</p>
  <button @click="handleClick">btn</button>
  <MyHeader :count="count" />
  <MyContent />
</template>

<script>
// es6的引入方式
import MyHeader from './components/MyHeader.vue';
import MyContent from './components/MyContent.vue';

export default {
  data() {
    return {
      count: 3,
    }
  },
  methods: {
    handleClick() {
      this.count++;
    }
  },
  components: {
    MyHeader,
    MyContent
  }
}
</script>

<style>
h2 {
  color: red;
}
</style>